package com.lianxi;

import java.util.ArrayList;
import java.util.List;

public class JiuJiu {
    public static void main(String[] args) {
        List<List> allList = new ArrayList();//定义allList中都为List类型
        for (int i = 0; i < 9; i++) {
            allList.add(new ArrayList());//向allList中添加9个ArrayList对象
        }

        String aa = "";
        for (int i = 1; i <= 9; i++) {
            for (int j = 1; j <= i; j++) {
                aa = aa + j + "*" + i + "=" + i * j + "\t";//将每一行赋给aa
            }
            allList.get(i - 1).add(aa);
            aa = "";//每一行赋完值后把aa变空以便于接下一行
        }

        for (int i = 0; i < allList.size(); i++) {
            System.out.println(allList.get(i));
        }
    }
}
